<b>查询：</b>
<select id="search_sel">
  <optgroup label="有往来联系人">
    <option value="contacted_on_in_near_one_week"><%= t :contacted_on_in_near_one_week %></option>
    <option value="contacted_on_in_near_one_month"><%= t :contacted_on_in_near_one_month %></option>
    <option value="contacted_on_in_pass_one_month"><%= t :contacted_on_in_pass_one_month %></option>
  </optgroup>
  <optgroup label="无进展联系人">
    <option value="no_contacted_on_in_pass_one_week"><%= t :no_contacted_on_in_pass_one_week %></option>
    <option value="no_contacted_on_in_pass_half_month"><%= t :no_contacted_on_in_pass_half_month %></option>
    <option value="no_contacted_on_in_pass_one_month"><%= t :no_contacted_on_in_pass_one_month %></option>
  </optgroup>
</select>
<script type="text/javascript">
  <%if params[:filter]%>
    $("#search_sel option[value='<%=params[:filter]%>']").attr("selected","selected");
  <%end%>
  $('#search_sel').change(function(){
    <%if params[:second_saler_id].present?%>
        location.href="<%= customers_url(:second_saler_id => params[:second_saler_id]) %>&filter="+$(this).val();
    <%else%>
        location.href="<%= customers_url %>?filter="+$(this).val();
    <%end%>
  });
</script>